import { ipcRenderer } from "electron";

export default {
    ipcrenderer(obj) {
        ipcRenderer.send("sendMsg", { userEmail: obj.userEmail, passWord: obj.passWord });
    },
    logout() {
        console.log("ipcRenderer退出登录");
        ipcRenderer.send("logOut");
    },
    maximize() {
        ipcRenderer.send("MAX_WIN");
    },
    minimize() {
        ipcRenderer.send("MIN_WIN");
    },
    close() {
        ipcRenderer.send("CLOSE_WIN");
    },
    reload() {
        ipcRenderer.send("reload");
    },
    openNewWin() {
        console.log("openNewWin");
        ipcRenderer.send("openNewWin");
    }
}

ipcRenderer.on("reply", (e, data) => {
    // console.log("e", e);
    console.log("data", data);
})

